package com.wx.gof.pattern.behavioral.mediation;

/**
 * @ClassName Mediator
 * @Author wx
 * @Description 中介类具体实现-同事类相互影响
 * @Date 2018-12-14-23:57
 */
public class Mediator extends AbstractMediator {

    public Mediator(AbstractColleague a, AbstractColleague b) {
        super(a, b);
    }

    @Override
    public void AaffectB() {
        this.abstractColleagueB.setNumber(abstractColleagueA.getNumber() * 100);
    }

    @Override
    public void BaffectA() {
        this.abstractColleagueA.setNumber(abstractColleagueB.getNumber() / 100);
    }
}
